﻿@model BlackBox.Controllers.AccountViewModel

@{
    ViewBag.Title = "AdminTools";
}

<div id="admin-tools-surrounding-div">
    <div id="admin-tools-game-list-section">
        <h2 class="admin-tools-headings">Game List</h2>
        <div class="admin-tools-list-table-div">
            <table class="admin-tools-list-table">
                @foreach (var Game in Model.GameData)
                {
                    <tr>
                       <td class="admin-tools-list-table-name">@Game.name</td>
                       <td class="admin-tools-list-table-id"><input id="@Game.id" type="checkbox" /></td>
                    </tr>
                 }
            </table>
        </div>
        <input id="admin-tools-remove-button" type="button" value="Remove" />
    </div>

    <div id="admin-tools-announcement-section">
        <h2 class="admin-tools-headings">Announcement</h2>
        @using (Html.BeginForm("AddNews" ,"Home",FormMethod.Post,new {enctype="multipart/form-data"})) {
        <fieldset>
            <div>
                <div class="editor-label">
                    <p>Title</p>
                    <!-- @Html.LabelFor(model => model.NewsData.title) -->
                </div>

                <div class="editor-field">
                    @Html.EditorFor(model => model.NewsData.title, new { @class = "announcement-title" })
                </div>
            </div>
            <div>
                <div class="editor-label">
                    <p>Message</p>
                    <!-- @Html.LabelFor(model => model.NewsData.message) -->
                </div>

                <div class="editor-field">
                    @Html.TextAreaFor(model => model.NewsData.message, new { @class = "announcement-body" })
                </div>
            </div>
            <input id="admin-tools-announcement-submit"  type="submit" value="Add Announcement" />
        </fieldset>
            
        }
        <input id="admin-tools-add-game" type="submit" value="Add Game" />
        @*<fieldset>
            <legend></legend>
            <textarea id="admin-tools-announcement-title" rows="2" cols="24"></textarea>
            <textarea id="admin-tools-announcement-body" rows="17" cols="24"></textarea>
            <input id="admin-tools-announcement-submit" type="button" value="Submit" />
        </fieldset>*@
    </div>

    <div id="admin-tools-user-list-section">
        <h2 class="admin-tools-headings">User List</h2>
        <div class="admin-tools-list-table-div">
            <table class="admin-tools-list-table">
             @foreach(var User in Model.UserListData)
             {
                <tr>
                    <td class="admin-tools-list-table-name">@User.UserName</td>
                <td class="admin-tools-list-table-id"><input id="@User.UserId" type="checkbox" /></td>
                </tr>
             }
            </table>
        </div>
        <input id="admin-tools-ban" type="button" value="Ban" />
        <input id="admin-tools-warning" type="button" value="Warning" />
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/Scripts/AdminToolsUserSelect.js")
}